package com.eight.vote.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * <p>
 * //用于转换时间和字符串的工具类
 * </p>
 *
 * @author 点点星言
 * @since 2022-10-07
 */
public class TimeUtil {
    public static LocalDateTime toLocalDateTime(String dateStr, String pattern) {
        return LocalDateTime.parse(dateStr, DateTimeFormatter.ofPattern(pattern));
    }

}
